<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
    <title>柚子驿站</title>

    <!-- CSS  -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection" />
    <link href="/css/style.css" type="text/css" rel="stylesheet" media="screen,projection" />
    <link href="/css/me.css" type="text/css" rel="stylesheet" media="screen,projection" />
</head>

<body>
<!-- <div class="navbar-fixed"> -->
<nav class="orange darken-2 lighten-1" role="navigation">
    <div class="nav-wrapper container"><a id="logo-container" href="/" class="brand-logo">
        <i class=" material-icons">chat</i>

        柚子驿站</a>
        <ul class="right hide-on-med-and-down">
            <li><a href="/">Home</a></li>
            <li><a href="/pullfeeds">Feed</a></li>
            <li><a href="/msg">Message</a></li>
            <li><a href="#"><i class="material-icons">search</i></a></li>




            <!-- Dropdown Trigger -->
            <#if user??>

            <li><a class="modal-trigger waves-effect waves-light btn" href="#modal1">发帖</a></li>

            <li><a class="dropdown-button" href="/user/${user.id}" data-activates="dropdown1">

                ${user.name}

                <i
                        class="material-icons right">arrow_drop_down</i></a>

                <!-- Dropdown Structure -->
                <ul id='dropdown1' class='dropdown-content'>
                    <li><a href="/user/${user.id}">我的主页</a></li>
                    <li><a href="/pullfeeds">动态</a></li>
                    <li><a href="/msg">消息</a></li>
                    <li class="divider"></li>
                    <li><a href="/logout">退出</a></li>
                </ul>
            </li>
                <#else>
            <li><a href="/reglogin">log in / register</a></li>
            </#if>




        </ul>

        <ul id="nav-mobile" class="side-nav">
            <li><a href="#">Navbar Link</a></li>
            <li><a href="#">Navbar Link</a></li>
            <li><a href="#">Navbar Link</a></li>
        </ul>
        <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
    </div>
</nav>



<div id="modal1" class="modal modal-fixed-footer">
    <div class="modal-content">
        <div class="row">
            <form id="submit-post-form" action="/post/add" method="post" class="col s12">
                <div class="row">
                    <div class="input-field col s6">
                        <input name="title" id="title" type="text" length="30">
                        <label for="title">标题</label>
                    </div>
                </div>
                <div class="row">
                    <div class="input-field col s12">
                        <textarea name="content" id="content" class="materialize-textarea" length="5000"></textarea>
                        <label for="content">内容</label>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="modal-footer">
        <a href="javascript:$('#submit-post-form').submit();" class="modal-action modal-close waves-effect btn  ">发布</a>
        <a href="#!" class="modal-action modal-close waves-effect btn-flat ">取消</a>
    </div>
</div>

<div class="grey lighten-3">